package com.ryan.programming007.web.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Main controller
 */
@Controller
public class AppController {

	/**
	 * Home page
	 */
	@RequestMapping(value = "/")
	public ModelAndView home() {
		ModelAndView mav = new ModelAndView("tiles.home");
		mav.addObject("path","/");
		return mav;
	}
	
	/**
	 * About page
	 */
	@RequestMapping(value = "/about")
	public ModelAndView about() {
		ModelAndView mav = new ModelAndView("tiles.about");
		mav.addObject("path","/about");
		return mav;
	}
	
	/**
	 * Contact page
	 */
	@RequestMapping(value = "/contact")
	public ModelAndView contact() {
		ModelAndView mav = new ModelAndView("tiles.contact");
		mav.addObject("path","/contact");
		return mav;
	}
	
	/**
	 * Tutorials page
	 */
	@RequestMapping(value = "/tutorials")
	public ModelAndView tutorials() {
		ModelAndView mav = new ModelAndView("tiles.tutorials");
		mav.addObject("path","/tutorials");
		return mav;
	}
        
        /**
	 * specs page
	 */
	@RequestMapping(value = "/specifications")
	public ModelAndView specifications() {
		ModelAndView mav = new ModelAndView("tiles.specifications");
		return mav;
	}
	
	
}